package com.example.demo.config;

import com.foxinmy.weixin4j.cache.RedisCacheStorager;
import com.foxinmy.weixin4j.mp.WeixinProxy;
import com.foxinmy.weixin4j.mp.model.OauthToken;
import com.foxinmy.weixin4j.pay.WeixinPayProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class WeiXinConfig {

    @Bean
    public WeixinProxy weixinProxy(){
        return new WeixinProxy();
    }

    @Bean
    public WeixinPayProxy weixinPayProxy(){
        return new WeixinPayProxy();
    }

    @Bean
    public RedisCacheStorager<OauthToken> redisCacheStorager(){
        return new RedisCacheStorager<>();
    }
}
